// 定义修改state变量的方法
import * as types from './mutation-type'

const mutations = {
    // 储存登录用户信息
    [types.SET_USER](state, data) {
        state.user = data
    },
    
    // 储存菜单信息
    [types.GET_MENU_LIST](state, menu) {
        state.menu_list = menu
    },

    // 菜单折叠
    [types.IS_COLLAPSE](state) {
        state.is_collapse = !state.is_collapse
    }
}

export default mutations
